﻿using System;
using System.Runtime.CompilerServices;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Animation;

internal class Class3
{
    

    public void method_7(bool Animat, TimeSpan timeSpan_0)
    {
        this.Init();
        if (Animat)
        {
            this.pathFigure_0.BeginAnimation(PathFigure.StartPointProperty, new PointAnimation(point, timeSpan_0));
            this.lineSegment_0.BeginAnimation(LineSegment.PointProperty, new PointAnimation(new Point(point.X, point.Y + height), timeSpan_0));
            this.lineSegment_2.BeginAnimation(LineSegment.PointProperty, new PointAnimation(new Point(point.X + width, point.Y + height), timeSpan_0));
            this.lineSegment_1.BeginAnimation(LineSegment.PointProperty, new PointAnimation(new Point(point.X + width, point.Y), timeSpan_0));
            return;
        }
        this.pathFigure_0.StartPoint = point;
        this.lineSegment_0.Point = new Point(point.X, point.Y + height);
        this.lineSegment_2.Point = new Point(point.X + width, point.Y + height);
        this.lineSegment_1.Point = new Point(point.X + width, point.Y);
    }


    private void Init()
    {
        if (this.pathFigure_0 != null)
        {
            return;
        }
        this.lineSegment_0 = new LineSegment();
        this.lineSegment_1 = new LineSegment();
        this.lineSegment_2 = new LineSegment();
        this.pathFigure_0 = new PathFigure
        {
            Segments = new PathSegmentCollection(4)
            {
                this.lineSegment_0,
                this.lineSegment_2,
                this.lineSegment_1
            },
            IsClosed = true
        };
    }

    internal PathFigure pathFigure_0 { get; set; }

    private LineSegment lineSegment_0 { get; set; }

    private LineSegment lineSegment_1 { get; set; }

    private LineSegment lineSegment_2 { get; set; }


    internal Point point { get; set; }

    internal double width { get; set; }

    internal double height { get; set; }
}
